<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>1.基本列表</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../js/vue.js"></script>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo">
      <ul>
        <!-- 想生成多个谁，就在谁的身上加v-for指令 -->
        <li v-for="p in persons" :key="p.id">
          {{p.name}}---{{p.age}}
        </li>
      </ul>
    </div>

    <script type="text/javascript">
      new Vue({
        el:'#demo',
        data:{
          persons:[
            {id:'kjasdyuasfdyt01',name:'晶晶',age:18},
            {id:'kjasdyuasfdyt02',name:'错错',age:20},
            {id:'kjasdyuasfdyt03',name:'强强',age:32},
            {id:'kjasdyuasfdyt04',name:'天禹',age:90}
          ]
        }
      })
    </script>
  </body>
</html>